/***************************************************************************
 SimpleMail - Copyright (C) 2000 Hynek Schlawack and Sebastian Bauer

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
***************************************************************************/

/**
 * @file ssl.h
 */
#ifndef SM__SSL_H
#define SM__SSL_H

#ifndef NO_SSL

#include <openssl/ssl.h>

#include "tcpip.h"

#define SM_SSL_OK          0
#define SM_SSL_PEER_FAILED 1
#define SM_SSL_HOST_FAILED 2
#define SM_SSL_CERT_FAILED 3

SSL_CTX * ssl_init(void);
int       ssl_verify_cert(struct connection * conn, int perr);
int       ssl_can_be_trusted(struct connection * conn);

#endif


#endif /* SM__SSL_H */